<template>
  <div>
    <L-Navigate @changeRoute="changeRoute"></L-Navigate>
    <keep-alive>
      <router-view> </router-view>
    </keep-alive>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { NavItem } from './types/Navigate.js'

let router = useRouter()

function changeRoute(item: NavItem) {
  router.push(item.path)
}
</script>

<style lang="less">
body {
  padding: @htmlPadding;
  margin: 0;
  background-color: #f2f3f5;
}

.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(20px);
  opacity: 0;
}
</style>
